<template>
	<view>
		<z-paging ref="paging" v-model="recordList" @query="getPage" :auto="false">
			<cu-custom slot="top" :bgColor="'bg-'+ theme.themeColor" :isBack="true">
				<block slot="backText">返回</block>
				<block slot="content">提现记录</block>
			</cu-custom>
			<view class="cu-list menu">
				<view class="cu-item solids-bottom" v-for="(item,index) in recordList" :key="index">
					<view class="content padding-tb-sm">
						<view>
							{{item.bankName}}{{item.bankCardNo}}
						</view>
						<view class="text-gray text-sm">
							实际到账
							<text class="text-red text-price text-xl margin-left-sm">{{item.paymentAmount}}</text>
						</view>
					</view>
					<view class="action">
						{{item.status == '1' ?'审核中': item.status == '2' ?'已打款':'已驳回'}}
					</view>
				</view>
			</view>
		</z-paging>
	</view>
</template>
<script>
	import {
		getPage
	} from '@/api/withdrawalapply.js';
	export default {
		data() {
			return {
				theme: getApp().globalData.theme,
				recordList: []
			}
		},
		onLoad() {
			getApp().initPage().then(res => {
				this.$nextTick(function() {
					this.$refs.paging.reload();
				})
			})
		},
		methods: {
			/**
			 * 分页查询
			 */
			getPage(pageNo, pageSize) {
				getPage({
					current: pageNo,
					size: pageSize,
					descs: 'create_time'
				}).then(res => {
					this.$refs.paging.complete(res.data.records);
				});
			},
		}
	}
</script>

<style>
</style>
